package com.cgc.web.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.fastjson.JSON;
import com.cgc.entity.Menu;
import com.cgc.service.MenuService;
import com.cgc.utils.ReturnJson;

public class MenuAction extends BaseAction<Menu> {
	
	public MenuService menuService;

	public MenuService getMenuService() {
		return menuService;
	}

	@Autowired
	public void setMenuService(MenuService menuService) {
		this.menuService = menuService;
		super.setBaseService(this.menuService);
	}
	
	
	public void getMenuTree(){
		Menu menu = menuService.getMenuList(null);
		System.out.println(menu);
		ReturnJson.writejson(JSON.toJSONString(menu), super.getResponse());
	}
	

}
